Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find executable code for coverage analysis #23

Merged
merged 7 commits into from
Aug 19, 2024

Conversation

Pchelolo
Copy link
Contributor

@Pchelolo Pchelolo commented Aug 12, 2024

We want to be able to find all "executable" lines in the hack codebase in order to compute test coverage.

This sets up the backbone for the new command, runs a visitor over all files in the codebase and outputs the results in a file. Right now we output start and end of each statement. It's not perfect, but I'll make adjustments in followups.

Copy link

Thanks for the contribution! Unfortunately we can't verify the commit author(s): Petr Pchelko <p***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce Inc. Contributor License Agreement and this Pull Request will be revalidated.

@Pchelolo Pchelolo marked this pull request as ready for review August 14, 2024 18:17
src/executable_code_finder/lib.rs Show resolved Hide resolved
src/executable_code_finder/lib.rs Outdated Show resolved Hide resolved
@muglug
Copy link
Collaborator

muglug commented Aug 14, 2024

This looks good! You might want to look at the test file config to only generate for production files

Copy link

Thanks for the contribution! Before we can merge this, we need @Pchelolo to sign the Salesforce Inc. Contributor License Agreement.

@Pchelolo
Copy link
Contributor Author

This looks good! You might want to look at the test file config to only generate for production files

Couldn't really figure out how to do that. Will try in a followup - there's still work to be done to properly classify various things as covered/non-covered. But we'd like to release this to try it out in read CI and make bug finding more collaborative.

@Pchelolo Pchelolo requested a review from muglug August 15, 2024 20:54
@Pchelolo Pchelolo changed the title Demo: hackana for finding executable code Find executable code for coverage anaysis Aug 16, 2024
@Pchelolo Pchelolo changed the title Find executable code for coverage anaysis Find executable code for coverage analysis Aug 16, 2024
@Pchelolo Pchelolo force-pushed the ppchelko_find_executable_code branch from f79942b to e4c6ca2 Compare August 19, 2024 22:01
@muglug muglug merged commit a94d161 into slackhq:main Aug 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants